package com.yzt.zhuju.IService.chatroom;

import android.os.Environment;

import com.yzt.zhuju.config.AppConfig;

import java.io.File;

/**
 * author : Irene
 * e-mail : 821970751@qq.com
 * date   : 2020/7/12 11:56 PM
 * desc   :
 */
public class ChatRoomSettings {
    /**
     * 网络音乐下载路径
     */
    public static final String PATH_CHAT_ROOM_MUSIC_DOWNLOAD = getChatRoomFileRootPath() + File.separator + "music";

    private static String getChatRoomFileRootPath(){
        File fileRootDir = AppConfig.context.getExternalFilesDir(Environment.DIRECTORY_MUSIC);
        if(fileRootDir != null){
            return fileRootDir.getAbsolutePath() + File.separator + "chatroom";
        }else{
            return Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "chatroom";
        }
    }
}
